package flst.ipiweb.proxy;

import flst.ipiweb.process.CommandeProcess;
import flst.ipiweb.transverse.Commande;
import flst.ipiweb.transverse.IPIWebException;

public class CommandeProxy {

	private CommandeProcess pcomm;
	private boolean droits= false;
	
	public CommandeProxy() {
		pcomm= new CommandeProcess();
	}

	public boolean getDroits() {
		return droits;
	}

	public void setDroits(boolean droits) {
		this.droits = droits;
	}
	
	public Commande getCommandeById(int id) throws IPIWebException{
		if(droits){
			return pcomm.getCommandeById(id);
		}
		else{
			return null;
		}
	}
	
	public void envoyerCommande(int id) throws IPIWebException{
		if(droits){
			pcomm.envoyerCommande(id);
		}
	}
	
	
	
	
	
}
